Remove unused feature of passing a graph to a target's function, add tests to the target class