Cleanup, #934
More helper functions, #934
New algorithm for reverse mode sparsity pattern propagation through integrators (backwards problem only), #934