Reactivated tab-related code; fit with new functionality. Commenting.