Added timeout to ajax, got rid of unnecessary debugging output.