Refactors add card popup view logic