Some groundwork for processing messages