Tidy up currently-unused code