Changed directory structure and adding tree code