more updates to delete.js (works now!)