Refactor routes a bit.