First working version of hashtable
Updates to main loop