Remove meaningless comments and variables
Refactor parsing command line options
Fix flake8 violations
Do flake8 to tests/ directory on testing
Use os.path instead of path directly
Replace exception classes by standard exceptions
Update docstrings and comments
Refactor variable name
Handle all exceptions in exporting images