Made some changes from the comments.