Refactor from Route to Controller