Add comments to bash functions.  Delete some unused ones.
Re-format and comment .emacs.