customised word-deleting, refactored js specific stuff out