Added overloaded constructor to TreeObject so that it can take a given key value.