Added the client-side logic for handling in-coming messages. Added all sorts of other miscellaneous goodies.