Help with code that is not working correctly

the sketch works perfectly fine

What sketch is that? The one full of errors that we have been pointing out, or something derived from that that fixes the errors?

What does removing the servo moving code have to do with incorrectly reading serial data?