Full MipMaps support, refactoring