Refactor setting the XDG environment variables