pprint: cleanup, docgen caching, logical plans