Improved plug-in API à la Unexpected

Fixes #7
4.0.0