finished controller refactoring, tests still need some attention