Redo everything in javascript