Refactor select view controller