cleanup of core.php