Code cleanup in response to pull request comments