Removing unused js functions

Some js functions was unused and variables too