Changes as per comments in pull request