Fix bugs

Fix a bug in parser of TypeRef.TypeName class, make its rule stricter.
Fix formatting bugs in ToString() override in serialization node classes.
Fix a bug in output of ConsoleReplInterface class.