Refactor controllers using Code Climate