Implemented Robert's comments in pull request