Refactored bashrc file building