Refactor and test ActionMessages