Issue #295: finalize implementation and add tests ...