Fixed tab close show event.
Changed var/function names, some comments.