set up routing and templates