Moving code over from the core