Remove debugging statements and unused generators