docs and fixing tests