Marching Square Refactor