Introducing an 'enums' module that doesn't depend on any other module.

This helps with potential circular dependencies.

I've also removed two boolean properties on ClassData (initialized/resolved) and condensed them into a single enum.

Finally, I've done some various loop cleanups.