Make progress in setting app.locals and bunch of generic functions.
TODO
  make a default config file for lacking value.