Merge pull request #16 from eisenachalex/controller_tests

Controller tests
controller and model tests and model fixes