S3_bulk_action() completed; documentation

Checked results with Mathematica.
Wrote LaTex formulae for functions.
Made comments consistent.
Made Doxygen output more readable.