Refactor core setting files
Still trying to fix circular import