added test cases for Device and TemplateLoader Class

Increased code coverage from 70% to 95%