fixing some routes and template loadings