Refactor with a hashtable for in progress object