Var subs in bash, some cleanup