simplify test program, omit invalid input tests, add comment for solver,

clean up example code, rename variable, fix error message.