Added template path
Updated templates for XML generation
Added code comments
Added new define