MODE-1710 Cleaned up code based upon code review

Relatively minor changes to the code based upon suggestions/feedback from
comments on the pull-request.