Various bug fixes in an attempt to get basic communication working.  Various debug print statements for debugging.