Made changes according to some of the comments