refactoring config, reorganizing structure