Added very conservative (and slow) encode/decode serialization to be resiliant over transport problems. Fixed transport problem created by use of print.