Forward ports for mic

Merge the stable branch into the mic branch to pick up improvement there as well.