Update Core.php

Use plugin system