Update and Error Fix

Updated some stuff, mostly related to data structures and XML, and fixed
most of the errors.