Tidied variable assignments and docstrings