refactors message
refactors message
core file uses message library