Refactor code into Bullet and Line classes
Optimize and cleanup Line.distance()