Added some data structures, wrote very very basic message handling code.