Add history controller to core API

Builds upon #803 to implement #423.
s/is not None// ?