Backend/config: refactor code

Signed-off-by: Jerome Flesch <jflesch@gmail.com>