some minor cosmetic changes and fixed up minor issues in area-close script