API for beginning and ending subscopes using varmap