Updated configuration mechanism  Added unit tests