cleaned up a bunch of code in message list