added capacity fields to edge and refactored edgefactory
rewrite the saved graph to be possible to parse with capacity