Fixed width and height, addded size sanity check and made findTarget return 0 if it has not found a targt