Refactored some bash code. But why?