remove code for non-core builds and "modernize"