File cleanup and fix of NdgPattern unit tests