Add docstrings and distSquared method