Optimize meshes, fix warnings