Integrate dmatveev3

memory leak fixes & some minor improvements