Added a tree and repaired scripts