collider logic changed, testCollisions method added
minor changes & some code organized