Refactor the default controller