Issue #191

Refactor
Bug fix
Tests
Merge pull request #203 from aodn/issue191

Issue #191