Chop onion and saute onion in oil. Add spices, garlic (pressed or chopped) and tomatoes with its juices and cook on stove top till boiling. Simmer for 5 minutes.
Add beans (rinsed) and corn and heat through. Pour entire mixture into casserole dish sprayed with cooking spray (11 X 7 X 2)
Mix together topping ingredients and spoon onto bean mixture already in casserole dish. Bake at 375 for 20-25 minutes or until topping is cooked through. Top with salsa if desired.