Refactor controllers for better separation