Plugin interface

A plugin interface that may actually make sense!

Pretty much implements #16