Code refactoring, move config to one file