Test suite for the binary protocol. Fixed inconsistencies with error codes.