Some refactoring.
Added https://www.npmjs.org/package/nconf usage.