Messaging overhaul, uses switch to deal with message types in read/write
finished merging Ganesh's work and my own