Remove lots of now-unused code