Don't global unused variables.
Get rid of global debug call to save time in production.
Micro-optimize globals inside the XML parsing functions
Merge branch 'microoptimize-xml'
If possible, load more data into memory at once to perform less XML operations total
Merge master