First draft of issue #51 implementation.