Continued refactor on if statements, fixed bug where else if's where too hungry and going to the next else, encompassing it's parallel if statement.
Fixed iterator returning null error and isLast not counting the array length and instead counting the object length.