  We define a "reduced" version of the knot Floer complex $CFK^-(K)$, and show
that it behaves well under connected sums and retains enough information to
compute Heegaard Floer $d$-invariants of manifolds arising as surgeries on the
knot $K$. As an application to connected sums, we prove that if a knot in the
three-sphere admits an $L$-space surgery, it must be a prime knot. As an
application of the computation of $d$-invariants, we show that the Alexander
polynomial is a concordance invariant within the class of $L$-space knots, and
show the four-genus bound given by the $d$-invariant of +1-surgery is
independent of the genus bounds given by the Ozsv\'ath-Szab\'o $\tau$
invariant, the knot signature and the Rasmussen $s$ invariant.
