Remove unused imports
Remove obvious comment, and move constants

Constants generally go before any "real" code
Pre-calculate filenames and loop better

In python you almost never use range when looping over a list. It's
faster and easier to read to just go "for x in y:".

See: https://www.youtube.com/watch?v=OSGv2VnC0go