cleanup old declarations and import core.memory