Refactoring RestClientManagerAndListener class