refactor dirs layout and add nconf module