Removes redundant brackets