added auto completion of  curly braces, fixed a small bug with folding and curly braces