Clean up BoxSide and BorderEdge code