Remove unused code

Some old code which is not being used anywhere (that I could find) and can be deleted.