  We perform a number of improvements to the previous AKK extraction of
fragmentation functions for $\pi^\pm$, $K^\pm$, $p/\bar{p}$, $K_S^0$ and
$\Lambda/\bar{\Lambda}$ particles at next-to-leading order. Inclusive hadron
production measurements from $pp(\bar{p})$ reactions at BRAHMS, CDF, PHENIX and
STAR are added to the data sample. We use the charge-sign asymmetry of the
produced hadrons in $pp$ reactions to constrain the valence quark
fragmentations. Data from $e^+ e^-$ reactions in regions of smaller $x$ and
lower $\sqrt{s}$ are added. Hadron mass effects are treated for all observables
and, for each particle, the hadron mass used for the description of the $e^+
e^-$ reaction is fitted. The baryons' fitted masses are found to be only around
1% above their true masses, while the values of the mesons' fitted masses have
the correct order of magnitude. Large $x$ resummation is applied in the
coefficient functions of the $e^+ e^-$ reactions, and also in the evolution of
the fragmentation functions, which in most cases results in a significant
reduction of the minimized $\chi^2$. To further exploit the data, all published
normalization errors are incorporated via a correlation matrix.
