Fixed bug with nested brackets. Correct handling of extra closing bracket(s). Correct handling of operators at the end of line.