update to meet coding guidelines and to include feedback from PR #2668.