Adding code to remove empty div and class attributes