Done:)
Errors left: buffer, deleteAll() and iDgenerator