Adding javadoc
Fixing unit tests