Refactors showViewController.