Removes extraneous brackets