refactor and add common configuration file