Yeah, "Errand of Mercy" there never seems to be any question of the Prime Directive applying despite Organia's being a "primitive" planet, so Organia must somehow have been contacted or managed to initiate contact? On Neural in "Private Little War" the Federation regularly does planetary surveys (presumably searching for exploitable dilithium?) despite it being a pre-contact PD-protected planet... which implies some more disturbing loopholes in the PD. Capella IV in "Friday's Child" basically has commercial and diplomatic relations with both Feds and Klingons, yet seems too primitive to have spaceships. It was all a bit amorphous.