Finished upsert logic for Account and Transaction.