Item13037: rewrite the core in an oo way