Made code more readable
Renamed obj to result
Refactored based on pull request comments
Merge remote-tracking branch 'origin/master' into delasteve

Conflicts:
	index.js