refactor the servlets.