Refactor message function to build_message

Relative to webapp message fail.