Refactor ApplyController