Additional code cleanup (see comments on issue #56)