Refactor ViewController