Minor improvements in bash scripts