Moved most of mainViewController's properties into class extension