Added javadocs. Modified the structure of the project to set some classes and methods visible only to the package members.