Update Midterm.m

Some minor fixes I've made.  Still not 100% yet