Using 0 where possible.
Updated implementation to match gephi.