merge several branches of added fixes/improvements.

merge several branches of added fixes/improvements.