Removed the unused tree structures to make the code more clean.
Declaring javascript functions consistently ( function funName (){} )
Refactoring javascript and started adding comments