dropped the mode argument for tree entries ( redundant )
some refactoring, initial work on builders