Simplify dispatch on problem in main.cpp