Partial resolution of issues #16 and #21