Extra documentation and corrected some implementations