Work in progress: create a plugin architecture for things to fit in

Probably not quite ready yet, still lacking some test coverage, but almost there.

This is addressed in 872b0a7, github thwarts me once again because you're making a comment about the implementation and the modification goes in the caller.