Fixed ArrayOutOfBounds issue in fillModels(). A result of trying to read the last time record with an index equal to the lenght of the time record array.
Removed unsused variable declaration