Added generics to generators.
Created queue for macro insertion (more reliable)