Cleaned up header
Fixed off by 1 for the image generation