Rewrote ID generator to support email tokens