bash to zsh, and refactor.