Moved template into javascript for now to get around CORS issue :(