Message prefixing and optimization