Minor code polishing, prep for KDC implementation