Refactoring the packages and javadocs