MALI: sync with 9.x branch, as much as posible. + junk clean.