Remove a lot of old code