Essays on elections and legislative behavior