Made docstrings in shapes consistent, refactored a bit.