You probably know this but this declares a global variable (and below's a bunch of global functions too). Better to put stuff inside a `(function () {...})());` which defines a scope