Merge "Minor code cleanup, addresses issues raised in issue 5097504"