Added a new file to help check for geometry errors
Refactored some files more