package refactoring, license added, javadoc added