Removal of generator.h and move generator function to utils.h