Remove a bunch of useless code