Made progname constant and added edit code.