Minor thing but you usually see people use only one `var` keyword.  Airbnb's JS style guide is one relatively uncontroversial style guide that recommends that. https://github.com/airbnb/javascript#variables