Cleaning up existing code in updatedb.php.

Also changing around php includes for better modularity.
SimpleXmlElement was a string.