Enforce FK, tag uniqueness; rename some classes