Added template loading, ajax

Now deleting script nodes when promise is in cache.