added nconf and config refactoring