Updated element-finding and removed debug message