Message panel changes

Some somewhat heavy changes to the message panel, should hold until we overhaul some of the database objects with references to the session so that we can better connect the two.