Added initial retesselate/subdivide code and debug tetmesh; bugfixes