Doco and unit tests

Change-Id: I609edaec58c766ecc1a3adf9d0f075af4cccfe27