Problem with Servo and Encoder

Any time I am working with encoders, I use Paul Stoffregen's encoder library. This is usually the first one you find if you search for an 'official' Arduino library.