Refactor provisioning scripts and fix zsh history.