Remove old code, tweak some things