Remove some dead code, add docstrings
Remove more unused code, add more docstrings