Finish rewrite of program import routine.