Added comments to checksidecollisions()