large commit including many fixes