Replaced the configuration with a proper class.
Also removed some of its almost unused methods cluttering the code.
Removed some useless code from repository trimming.
TODO: Configuration trimming, check if the new implementation works well.