cleanup and trying to get close tab to work