Refactored some meals controller functions into modules.