Make variables and config loading more clear, add a bunch of tests for config loading