Using hashmaps full of refs to try and speed this thing up.