Refactor message handling in the new Assert class
Add more unit tests