Converted to plugin system. Fixes #11