Remove code clear
Reorganized and insert Y in leaf finished