Update main.js

adding "DELETE" functionality