Fixed widget previews and added a renderTemplate fn