Wk1 main.js Refactored finished. editItem still needs work.