Fix servo buzzing and delayed response

I am trying to make my arduino uno set two different servos to positions relative to two potentiometers and I have a few problems. First the smaller of the two servos will vibrate( I think its what they call “jittering” or “Buzzing”) when it is told to move, I think this is just a power supply problem but I,m not exactly sure how to fix it. My second problem has to do with the Larger servo, whenever I have a 9v battery plugged into the power supply, I turn the corresponding potentiometer the servo will wait a few seconds before moving, but when i have it plugged into both the 9v battery and the computer it will respond almost immediately.

Here are some specifics, if you need any more info just ask.
powered by 9v battery
pots on A0 and A1
Servos on D9 and D10
Servo gnd and +5v connected directly to arduino

Here is the code:

#include <Servo.h>

Servo servoBase, servoTilt;
void setup()
{
servoBase.attach(9); //declare servos
servoTilt.attach(10);

}

void loop()
{
controlBase();
delay(15);

controlTilt();
delay(15);
}
void controlBase()
{
int val1, P1; //declares values for input and input value
P1 = 0;
val1 = analogRead(P1);
val1 = map(val1, 0, 1023, 10, 170); // scale it to use it with the servo (value between 0 and 180)
servoBase.write(val1); // sets the servo position according to the scaled value
delay(15); // waits for the servo to get there
}
void controlTilt()
{
int val2, P2; //declares values for input and input value
P2 = 1;
val2 = analogRead(P2); // reads the value of the potentiometer (value between 0 and 1023)
val2 = map(val2, 0, 1023, 10, 170); // scale it to use it with the servo (value between 0 and 180)
servoTilt.write(val2); // sets the servo position according to the scaled value
delay(15);
}

Paubilio:
Servo gnd and +5v connected directly to arduino

Ooooh, no, you don’t want that. Connect the servos to their own power, don’t get power from the Arduino. Connect the grounds. See attached pic.

servo power.png

powered by 9v battery

You need a better external power supply for servos than a small 9v battery, something like 4 AA batteries at a minimum, or a 6v wall wart.

thanks, that helped a lot but my smaller servo is still doing a little twitching.