Added documents. Minor fixes in the tests.