Move common functions into Core.