split core constants and cleaning code