Removed unnecessary variable
Removed unnecessary count variable
Removed unnecessary tga_y_start and tga_x_start variables
Added divide-by-zero check