Modularization

Moved to an extensible plugin architecture.