code refractor.moved the template creation logic to seperate class
removed unused files