While Loop Update

Removed "i" from the conditions, Added Free Loop, and "Countmax--;" if
not enough json objects to finish loop.