Move MdsGetMsg from header to library