Refactor messages specs