Restructure sample programs.