Included documentation and fix tests.

Change-Id: I1493eb924b7ffeb9fb81371157ea312a367a6ede