clean up all the things

* slims code base down
* remove unneeded try/catch syntax
* define device variable on window itself