Remove unused code and cleanup main ViewController