cleaned up ajax stuff