diff --git a/pdf.c b/pdf.c
index ffac6b424e4b3c9a0a50b9246a0540e7c6aa14df..d5749a165da6eedc247bd16a7ac46acbeba18e32 100644
--- a/pdf.c
+++ b/pdf.c
@@ -68,9 +68,10 @@ bytes_eq(HBytes b, const char *s)
 	return strncmp(s, b.token, b.len) == 0 && b.len == strlen(s);
 }
 
+/* This probably belongs next to Ref and XREntry,
+ * but dictentry() needs to know about this type */
 typedef HCountedArray Dict;
 
-
 /* a helper to look up a value in a dictionary */
 const HParsedToken *
 dictentry(const Dict *dict, const char *key)
@@ -165,14 +166,16 @@ pp_ref(FILE *stream, const HParsedToken *tok, int indent, int delta)
 	fprintf(stream, "[%zu,%zu]", r->nr, r->gen);
 }
 
-/* TODO XXX call pretty printer on each seq element */
-/* TODO: does the default behavior need to be overriden to only print the V: field? */
-/* TODO: booleans get printed as null */
+/* Can the default behavior be overriden to only print the V: field? */
+/* Warning: boolean keywords get printed as (null),
+ *  since the LIT() macro parses them with h_ignore() */
 void
 pp_dict(FILE *stream, const HParsedToken *tok, int indent, int delta)
 {
 	if (tok->seq->used == 0)
 		fprintf(stream, "{ }");
+	/* If there is more than one key-value pair, print all but
+	 * the last, separated by commas. */
 	else if(tok->seq->used > 1)
 	{
 		fprintf(stream, "{%*s", delta - 1, "");
@@ -183,12 +186,12 @@ pp_dict(FILE *stream, const HParsedToken *tok, int indent, int delta)
 			h_pprint(stream, k_v->elements[0], indent + delta, delta);
 			fprintf(stream, ":");
 			h_pprint(stream, k_v->elements[1], indent + delta, delta);
-			fprintf(stream, ",");
+			fprintf(stream, "\n%*s, ", indent, "");
 		}
 		
 	}
 	
-	/* Special case: no comma at the end of last entry */
+	/* Special case: the last entry doesn't have a comma after it */
 	const HCountedArray *k_v;
 	k_v = tok->seq->elements[(tok->seq->used)-1]->seq;
 	h_pprint(stream, k_v->elements[0], indent + delta, delta);
@@ -412,8 +415,6 @@ act_dict(const HParseResult *p, void *env)
 {
 	Dict *dict = H_ALLOC(Dict);
 
-	//dict = H_FIELD(Dict,0);
-
 	return H_MAKE(Dict, (void*)p->ast->seq);
 }