Added some of the stuff needed for processing messages