Add variable replacement to templates page. Todo: need to implement logic to remove unwanted entries