cleaning up ajax stuff