add comments and clarify var names of a few methods in LdpWriter