Added missing docs. Fixed unit tests.