pull message handlers into their own file (not too happy with the interdependencies)