Moved templates into seperate tpl file to allow easier overriding and fixed build process regarding it