Initial program
Fixes for bad file handling, template parsing