Fixed a few code smells.