code review suggestions

Suggestions for pull request #1456