Refactored ViewController