Refactor loading of configuration and initializations of clients