Refactor controllers to trait+object pattern