Issue #27: add missing functions, javadoc and tests