Split index logic for co-ordinating config load

Move into config/index, less giant block in index.js