Move all of the Flag stuff to the header.