rebuild remoteAjax function, add test for null options