Remove unused code

Some old code which is not being used anywhere and can be deleted.