Refactor servlet set up as an overlay on top of citeservlet.