fixing typo in comments
adding test script to package.json to enable using npm test
adding tests for when duplicate property values exist and fixing bugs based on those tests