Re-arrange and make private a bunch of things.