More work on issue #25... ready for updating unit tests