Refactoring messages + msg detail