move Message type into its own source file