Cleanups, further extension of framework