Is there a reasonable way to get unit or system tests for this class? I'd be very worried about regressions when trying to modify some of the rectangle aggregation code :(