Initial copy from DTF project last semester.