Added doku and unittests