clean up messages, fix tests