Refactoring of PmMessageUtil to PmMessageApi