Plugins

This branch implements the plugin system #1