Replaced previous resource resolution with the faster method,
added JSON chached resources on the first request
transformed for in loops to index  based loops