Finished duplicate event collision functionality

Still needs test cases.