clean code: refactor, javadoc, code stability, tests
add loggers.