Issue#408 plugin framework

Framework for plugin mechanism.