Added constraints
Fixed small bug
Fixed small bug
Small fix
Addressed calling-context problem