Bugfixes to address XML formatting

Repo version throws a fatal error as of March 2013. Needs array indices to get correct data from XML/DOM.