Redesigned the Texture classes

Also fixed the XML texture mapping