Refactor Javascript into files based on role

Remove magic numbers

Remove duplicative code

Fix spacing

fix naming

WIP: Refactor naming and spacing

WIP: Redesign script design