Got tree class working