  This paper studies space curves C of degree d and arithmetic genus g, with
homogeneous ideal I and Rao module M = H_{*}^1(I^~), whose main results deal
with curves which satisfy Ext^2(M,M)_0=0 (e.g. of diameter, diam M < 3, which
means that M is non-vanishing in at most two consecutive degrees). For such
curves C we find necessary and sufficient conditions for unobstructedness, and
we compute the dimension of the Hilbert scheme, H(d,g), at (C) under the
sufficient conditions. In the diameter one case, the necessary and sufficient
conditions coincide, and the unobstructedness of C turns out to be equivalent
to the vanishing of certain products of graded Betti numbers of the free graded
minimal resolution of I. We give classes of obstructed curves C for which we
partially compute the equations of the singularity of H(d,g) at (C). Moreover
by taking suitable deformations we show how to kill certain repeated direct
free factors ("ghost-terms") in the minimal resolution of the ideal of the
general curve. For Buchsbaum curves of diameter at most 2, we simplify in this
way the minimal resolution further, allowing us to see when a singular point of
H(d,g) sits in the intersection of several, or lies in a unique irreducible
component of H(d,g). It follows that the products of the graded Betti numbers
mentioned above of a generic curve vanish, and that any irreducible component
of H(d,g) is reduced (generically smooth) in the diameter 1 case.
