Fixed some issues with with target finding. Cleaned up debugging statements