Rework as per issue #7