Externalising js