Rework Plugins

Note: Still preliminary, it's not at all ready for a merge. At the very least the history needs to be cleaned up.
spurious variable?