Added mock_accounts and fixed tests