rewrite. use python 3. extended plugin/module architecture.