Cleaned up code and corrected documentation.