Updated to have a flag section in history as well.