Initial commit

The script is now functioning but crashes every x image.