some refactoring, make it run as a twisted plugin
Add missing directory
Fix tests
Restore integration test
Merge branch 'feature/hedley_start_cmdline' into develop