Start to move the hardcoded configuration into files

Hi there,
This is a test to move one of the huge list of bg_misc.c to external files. It seems to work well but although I checked everything several times I could have made a typo somewhere.
I did not take advantage of the preprocessor as it didn't work for me.