Add comments, docstrings, clean up code
Add comments, docstrings, clean up code

Use greadient instead of np.diff for residual, Clean up external_only integration prep.

jensv/fluxtubestability,jensv/fluxtubestability