This PR removes the global Args variable and instead refactors everything so that the right places have access to the datadir without a global variable. It also removes the global definition of flags, so that it's possible to use the code as a library without getting the flags defined.
This PR removes the global Args variable and instead refactors everything so that the right places have access to the datadir without a global variable. It also removes the global definition of flags, so that it's possible to use the code as a library without getting the flags defined.