Removed  deprecated code

removed the no longer used collapse code