Added script.js and finished basic logic