added unit tests for configuration library and fixed several bugs for multi-site