Added withEndpoint and filtering of Double.NaN