Made pyflakes changes to sessionmessageprotocol and preferences