create.js nearly working (DELETE/INSERT currently happening in wrong order)