Removes redundant spaces inside curly brackets