Tree Update: Controls

dat.gui and making the code reusable.