add debug output to most template parsing stuff.  It should at least
tell you the proper file-name if it crashes while parsing, and hopefully
it will tell you the line number and offending line contents as well
minor cleanup of template parsing error output
more cleanup of template handling code
model editor gui still WIP, but it now can render models...
fix error of NPE on primitiveBox copy operation