merged many fixes from students: thanks