Move more JS to dedicated file