Rewriting tr class to not end up with empty classes.