renamed emitComment, write -> comment, code