Add a domain-info function and refactor ZSH functions to files