Improved parser and handling (auto completion) brace pairs.