Adds comment unserialization and fixes a few bugs