C-minor fixes after a code review and more docstrings