fixed syntax errorr
Fixed doctests.
Added doctests and fixed some minor problems in Config