More templating, preliminary route handling. Tests are currently failing.