Updated documentation and corrected a minor comment inside the code