refactor: remove the view related code into ViewController