jslint compatibility and making use of Object.keys built-in method instead of array_keys

the title describes pretty much everything. for installing jslint use `npm install jslint`. for Object.keys method take a look at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/keys