Cleaning the driver (adding docstrings, etc.)