more cleanup to linked account code