Write some name generation infrastructure, and move utility functions to Utils.hs