Cleanup a lot of unused code.