Using regular javascript hashes instead of hashtable library