thermal exp, c_v, c_p, Model improvements

remove all references to main while we are at it
add error checking