Code refactors related to issue #42