Fixed indentation problems in sparse Cython module
Factored out ratio & unit number calculation from sprout+retract fn

Made sprout and retraction function more readable by factoring out
many of the CF-wise calculations of ratios and unit numbers. Also
fixed a number of parameter declarations.