I meant to mention this earlier, but this is increasing the size of all hashmaps quite significantly. Why not only store the keys?