End-to-end flow

Still needs polishing, but worth committing  at this point.