added docstrings and corrected compiler notes