Cleaning up PolyMeshDetail and fixing it's bugs. Also, found some black magic.