Added Javadoc
Fixed small errors