Core-Electron Splittings and Hyperfine Fields in Transition-Metal Compounds