Added functions to pre and append html content for external use