Removed uneccessary function and print-function

I removed the unecessary getimage() function, and put it right into the
loop. I also removed a print loop left over from debugging.