Refactoring re. issue #17