Added fallback for config-loading. Removed configs from "main".

Also some refactoring for loading web-app or reloading.