move templates and add lib