Added changes to function generator.