Added more examples, fixed handling of constraints