Refactoring MagePersistentServlet