Code documentation
This MR primarily adds docstrings and some comments to multiple functions throughout the code to improve the documentation of those parts of the code.
This MR primarily adds docstrings and some comments to multiple functions throughout the code to improve the documentation of those parts of the code.