Finish up externalizing javascript