Added accounts
Moved error handling