Fixed tree bug, added upload lib.