Converted to pep8 and made the message framework work in the latest version of Django.