Accounts refactoring