Reordered files, changed plugin interface

I'm bad at committing.