Revert "Runs much faster without the hashmap..."

This reverts commit 906d75108e220753b32b219d78c6e6fc5af0b370.