Improved ecode protocol.