HTML template tested. Working as desired now.