Refactor to use named routes