Refactor config loading.

This requires rewrite production environment config.coffee with new changes.