Switch to using ajax and servlets