Some changes in midterm code