Refactor messages out into their own module