Handle enums better when referenced
Simplify some of the code and the name generation is much better and consistent