Writing docs. Minor improvements.