Plugins

Merging plugin system into master branch