Merge improvements and extra tests, mainly to deal better with creating non-bare...