Porting some tests from 2.0, changed MemoryPoolWriter binary write function to WriteRawBytes
Reverted WriteRawBytes, added fixes based on comments