Optimized expand-all performance and moved CSS