Move some JS around