Fix issue with newline following closing array bracket
Move comment processing around
Don't catch arrays which are inside strings