Added account deletion with error checking.