Updated Generate for standalone operation