utility files, added templates, refactored