continue working on message viewing and cleaned up a bit of code
Merge remote-tracking branch 'origin/master'