Made minor cosmetic changes to code