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.
funny spacing in 3 parts of this file?