Refactor servlets