add route config and move view templates to external files