renamed variable
added reset function
changed output check for specs, and changed name of canvas to window when referenced in other objects