Refactored figure.border.div handling

Refactored figure.border.div handling