Tidy up imports
Fix disconnect bug. fixes #1
Keep lines less than 80chars
Reconnect on disconnect
Ensure listener has started cleanly