removing extra braces and reformatting