Refactor controller methods