Inaccurate IR Sensor Reading

@Wawa @anon35827816 I've followed your suggestions and gotten a 5V 2A power adapter and connected the power pins to it, while keeping the signal pin attached to the Digital pin in Arduino. However, the servo is now not responding to any commands and only jerks when I nudge the female plug. I've checked the voltage across it and it is a stable 5V. Any suggestions?