Revised Core.php