refactoring of the AccountManagerImpl