Moved duplicate servlet stuff to new helper class