Reduce duplication in `empty` function
Simplify storage of flags and user facing API for removing them