Removes obsolete code from the TableWidget