Added a couple of tests, some ball logic and javadocs.