Cleans up, removes unused js functions