Added some very basic tree searching functions
Added code for writing XML files