Added ability to add templates and started correcting layout