refactoring namegen to not need extra classes