Added javadoc and new example