first pass at reorganizing the bash scripts