Uses the mapped source and target uid values instead of assuming a uid member

Fixes oculusinfo/aperturejs#6
Calculation of flowWidth moved before first usage

Fixes oculusinfo/aperturejs#7