added documentation
broke use of dialogs somehow
changed template files to have a root element and no comments before it