Fixed flow into reservoirs

and some formatting