Fixed a bug in Query debugString method
Rewrote debugString method in container classes to be more elegant