TextureManager added. Texture class improvements. Other fixes