Hash table refactoring