Initial draft of complete program.