floats in, floats out, doubles internally for graph structures.

I have fixed some casting issues and errors.