tidy custom textures, fix some bugs