Mostly working version of plugins before I start really breaking stuff
First draft of rewrite