Restructuring templates and added router