Refactor routes commands