added factory methods for node and tree and some initial methods