Not to be overly nitpicky, but as far as i can see "weight" is used a handful of times, and it may just be easier to forgo this initiation and assignment and just use "e.weight" where ever weight is used.