script.ts: Fixed scrolling in FireFox
script.ts: organised into modules