Fixed minor bugs.

Next commit will outline major changes.