Fixed gradient magnitude breaking ambiguity.  Updated string representation function.