Move flag-related code into new pkg package

If whomever added `transport` there jumped off a bridge, I have to say yes, yes I would.