flags cleanup, WIP [ci skip]