added sensible toString() methods.
Improved debugging.