Apply Google JS Styleguide & add tests