Lots of updates, flags and gains related