fixed tests, javadoc, code style