Removing unused components from generator