Get ride of some code smells.

Used reek to check for some code smells. Fixed a few that made sense.