Added breaks in search loops to increase performance.