Wrote first test file and refactored part of home controller