Implemented changes as discussed in PR.