Moved a function into Cor as it is needed at runtime.