Sorting idea needs refinement.

Fixed collision detection to an extent. Currently just checking every
ball against every other ball in a brute force manner, sorting idea is
interesting but needs more testing.