[2.0] Refactor core