WIP: Added template code