added write request and ack messages
chunk size parameter
cleanup and write code. Frame for the read