Added Write functionality.
Fixed bug with read.
Set up protocol structure (volatile)