Finished converting to hashtables, with poor performance so far