Try to make IDs unique.

Cross-referenes are broken, though. But I figure it's a start toward resolving #19.