Converted image processing to use goroutines