Implemented layout optimization for tablets