Added bracket/parentheses completion and minor changes