Refactor to Twisted plugin architecture
PEP8