AJAX Updates

Add ability to pass a function as AJAX data; another try at clearing
caches (still not working)