Clean up and rearrange stuff.