Clean up unneeded scripts, move the activation to an external js file