Clean-up IdGenerator after redirects are done

Looks like very much of the clean-up I originally did in this patch
became part of other patches and already got merged. That's why not
much is left here. Should be very easy to review now. ;-)

Change-Id: I8c7399eb1d05a03d855f63cdaa7e2bf253284f12