Migrate Defaults function to Defaults.php