Simplify ismesh (Not yet tested for efficiency)