Add rustdoc comments for flags module