javadoc up + little refactoring