Corrected speed and direction. Also implemented speed limiter