organisation of tree functions added, fixed .gitignore