Fixed exeption on collision when the ball speed is zero
Refactored. Added additional unit tests.