Fixes for JSHint and style
Adjust trackMetric def from code review
Grab devicedata dependencies from window

Any `require` statements here and browserify will bundle it into the
`app.js` dist file (dublicate code, or error if dep not in
node_modules).