Addressed comments from the pull request. Mostly minor issues.