Draft of assemble, untested. Corrections to checkout