Added checks for proper account type and transaction type.