removed a lot of unused code and variables from editSample.js