bash cleanup/re-organziation