Added javadoc and corrected packages.