Integrate Gordon Sims enhancements from Oslo-Messaging
PEP8 cleanup