Efficient pseudospectral methods for density functional calculations