Updated the name clash checks to include enums.
Cleanup of duplication.
More work on enums.