Add router package and change templates to use routes.