Fixed algorithm to work correctly for large input data sets. Changed circle events data structure. Added visual examples and test cases.