Arduino Acts weird when using servo libary?

The servo library prevents use of PWM on pins 11 and 12 so you need to use an alternative pin for A4output.

What sort of 9V battery ? If it is a PP3 then it will last for a very short time before going flat particularly as it is powering a servo. Why not use the LiPo to power everything ?