add more unit tests for Controller

This branch0 begins adding more unit tests for Controller. Please pull this branch and I will add more tests later in a new branch (as time allows).

Trac:
Username: robinson