sync with main mongoose branch, includes all our patches so far as well (nw)