Made some changes based on comments in previous pull requests
Changes based on comments