core config save, source refactoring