Refactor foods controller