Updates from code review. Ready for pull request.