cleaned up ajax problems