Some minor modification (open inside the generator for better readability) + one bug fixe (the last block wasnt yiel by the generator)