Better encapsulation for Config and some test cleanup