Correction of errors, reordering features, elimination of useless code