Fix broken transferVariable

Fix for transferVariable().  Also added make_new_cell2() helper
function.