added support for # comments in serialization