More work on checkout code