Greatly simplify bracket rendering code