Fixing tests and documentation