Graph centroid selection, Q error, etc. functions
done.

small Bugs removed.