Added calls to maintain the MDC and provided some JavaDocs