Updated with tern and jshint2