Private functions refactoring based on Google style guide for bash