Better Debug instances and __repr__ methods.
#891
Merged
Debug instances and __repr__ methods.
#891