Why does the elbow turn the wrong way?
With an IK Constraint, you specify a pole target to control the way the bones bend. I expect you created Bone.009 and Bone.010 to be these pole targets.

Set the pole target to the armature and then the choose the bone to use. To control the direction of the rotation, you adjust the PoleAngle. You can then animate the pole target bone to control the bend during animation.