Moved collision handling logic to separate module. Added mass and implemented elastic collisions.