removed dead code
moved logic into scripts.js and rewrote into class pattern. Added tests, added packagejson with dependencies