Extract configuration handling in a separate class