Refactoring FlagButtonView and adding popover.