Refactored meshing to class based design that keeps track of node matrices