Partially revert PR #2190

The core shouldn't depend on constants that are not defined by itself
12 files changed