Refactored view controller to be lighter