Added zero(d) and one(d)
fixed bug in VectorFun