api fixes and cross-ajax