More unit-test and documentation