Add error detection and improve layout
Improve layout