Add comments. Set static prog_flush function.