added plan/fact presentation, fixed many bugs and added constraints