Cleaning up javascript loading and require's shim creation.