Wrote bulk of program