Refactor expiry dialog