Restructured most programs

works well