added templates and set up dirs