Fixed with new template

Moved code to new template