Made some changes recommended by jim