Added tests & documentation for the flow struct