Remove dead code, tidy up.