Added model tests, refactored controller tests