package refactoring + start of javadoc