Added material class. Some changes to texture class to let textures own their surfaces.