flow: code cleanup

Change-Id: I2228142e1dfcdd140ee712d8fc1c8578399aa0c7