factor out toggling a cell and rename the css classes and data elements