moved messageing stuff from common.go to messaging.go