Added another function to get all accounts in the db, also identified bugs.