Cleanup; abstraction; prepare for coyoneda, etc.