wip templates refactor
wip merge for templates refactor