moved templates into lib