move bc code into configuration class, add more tests.