Bash boilerplate, logging, error checking, niceties, functions, and flim-flam.