Encoders and The Man with Two Brains. (It was Dr. Huuhururrr by the way and I swear to God, I didn't have to look up the spelling).
So I am running 2 cogs now. One is running my motor and the PWM signal going to it. The other cog is keeping an eye on the encoder. I think the video is self-explainitory.
https://www.youtube.com/watch?v=HeOJSWqgfnQ