Removed duplicated message code