Rather large rename refactoring, and fiddled with option types/lifting.

I probably missed something, but I'm tried and all the tests pass so
it's good enough for now.