Added a few unit tests to main controller