utils refactoring, reading settings from python