Worked on Advanced Generator and fixed a few bugs