Edited weight functions to be OBJC blocks that are passed in on creation of ImageToGraph, this is the last commit before switching branch to the iterative version