Clean up APPCore.class.php