Refactored controller() and began a test file for step 5