Simplified search code and array strucutre. Javascript view code adjusted to compensate. Since we only need one page, two nested loops are not needed.