Remove some obsolete unused code