Implemented depth check on a tree.

Fixed operators passing things
unnecessarrilly (forgot about map constructors :p).