Rotary (incremental) Encoder Controlled Menu

I adjusted the code to make it simpler for myself. It does what I want, but not good enough.
I sometimes have to make a lot of turns and sometimes it jumps a few menus ahead.
Also it doesnt go from menu 8 to menu 1 and vice versa.

http://pastebin.com/nGnhK12K