Made changes according to comments in pull request.