Streamlining the byte array handling

Adding helper methods to help streamline the writing and reading of the
byte arrays.
Added two more message types

Added the other two message types that were in the MessageType enum.