Make IDGenerator non-static and provide a constructor.