Initial draft for adding Route model and APIs

Using named return vars will make this `if` and `return` unnecessary.