Re-organizing (and making clearer) bash scripts.