Fixed broken Junit tests
Javadoc and most todos