better error msgs
minor fixes
play with defunctionalized fact