Cleaning up code
consistent capturing
recognizing rectangles
Testing distances
Merge branch 'rectangles'