Moving all into script.js. Doing fancy stuff all around. It works, till the very end