fixed texture fetchers, fixed automatic mipmap generation, some cleanup