Added a reset function to globals
Added window prefixes to global refs in logic.js
Referring to globals with window prefix