Do a bit more cleanup, and shuffle a few things around