Minor changes and some fix in prunning