Revert unique names and add legacy token support

Unique names were added to the schema to support legacy tokens and it ended up wreaking havok in some unexpected ways.
This rolls back the schema changes and adds a simpler "legacy token" support.