A new pseudopotential generation method is presented which significantly improves transferability. The method exploits the flexibility contained in the separable Kleinman-Bylander form of the nonlocal pseudopotential [Phys. Rev. Lett. 48, 1425 (1982)]. By adjusting the functional form of the local potential, we are able to improve the agreement with all-electron calculations. Results are presented for the Ca atomic pseudopotential. Configuration testing, logarithmic derivatives and chemical hardness all confirm the accuracy of these new pseudopotentials.