Clean up a bunch of unnecessary code.