ENH added one more test to test for config object and cleaned up some other code