Removing unused js functions