Working to make Flow class more generic