Moved border logic to the controller.
Switched from Div to Table. Simplified border logic.