Slight modifications

Changed dt1max and dt2max to be in rad/s
Cleaned up twitch.m a little and fixed some a small issue.