Tweak for performance including switching to alist from Map