Add docstrings
Put arguments in more logical order
PEP8: whitespace