Credit generation update

Cleaning generate_credits.py
Adding missing docstrings