Rewrote the configuration manager, fixed tests, added logging support