All kinds of fixes and optimizations, especially for submeshes