Updated

Added collision detection and changed comments.