Cleanups, test case adjustments, extraction improvements