Implemented basic handling of collision detection.
Merge remote-tracking branch 'origin/master'