Refactor viewController. All tests pass.