Do some clang formatting
Add missing messages.h include.
Merge branch 'newio'