Remove lots of code that is currently unused.