Split out Javascript