Clean up transfer message code