Added documentation and corrected spelling.