Finished code to check collisions, gives more collisions that it should.