Fixed 3d. Now all tests work, except from machine precision errors.
Added a new test for flat manifold checks on faces.